﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Ovvio.Web.Models.LogOnModel>" %>

<asp:Content ID="loginTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Log On
</asp:Content>
   
<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
    <div>

    <%  Html.Telerik().Window()
            .Name("Window")
            .Title("Register")
            .Content(() => {%>
                <% using (Html.BeginForm("Register", "Account", FormMethod.Post, new { id =
                    "registration-form" }))
                   { %>
                        <fieldset>
                        <div><h3 for="Upline">Upline:</h3><a href="" ></a></div>
                        <div><%= Html.TextBox("Upline") %></div>
                        <h3 >Login Information</h3>
                        <div><label for="Username">Username:</label></div>
                        <div><%= Html.TextBox("Username") %> <a href="" >Check availability</a></div>
                        <div><label for="Password">Password:</label></div>
                        <div><%= Html.Password("Password") %></div>
                        <div><label for="Password">Confirm Password:</label></div>
                        <div><%= Html.Password("ConfirmPassword") %></div>
                        
                        <h3 >Personal Information</h3>
                        <div><label for="LastName">LastName:</label></div>
                        <div><%= Html.TextBox("LastName") %></div>
                        <div><label for="FirstName">FirstName:</label></div>
                        <div><%= Html.TextBox("FirstName") %></div>
                        
                        <h3 >Contact Information</h3>
                        <div><label for="Email">Email:</label></div>
                        <div><%= Html.TextBox("Email") %></div>
                        <div><label for="Phone">Phone:</label></div>
                        <div><%= Html.TextBox("Phone")%></div>
                        <div><label for="Mobile">Mobile:</label></div>
                        <div><%= Html.TextBox("Mobile")%></div>
                        
                        <div><label for="Address">Address:</label></div>
                        <div><%= Html.TextArea("Address")%></div>
                        <div><label for="City">City:</label></div>
                        <div><%= Html.TextBox("City")%></div>
                        --------------------------------------
                        <div><%= Html.CheckBox("IsSubscriber")%><label for="IsSubscriber">Send me updates or offers via email.</label></div>
                        
                       </fieldset>
                        <div >
                            <button type="submit" class="t-button">Register</button>
                        </div>
                <% } %>
            <%})
              .Width(550)
            .Draggable(true)
            .Modal(true)
            .Visible(false)
            .Render();
    %>
    <table width=100%>
    <tr>
    <td>
    </td>
    <td style="width: 15em"></td>
    <td style="width: 40em">
    
    <div class=logon-area >
        <div class=logon-area-innerbox >
            
        <% using (Html.BeginForm()) { %>
            <h2>Ovvio Sign In</h2>
            <%= Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %>
            <div class=logon-area-inner >
                <div class=subtext >
                    Please enter your username and password.
                </div>
                
                <ul>
                    <li>
                        <%= Html.LabelFor(m => m.Username) %>
                    </li>
                    <li>
                        <%= Html.TextBoxFor(m => m.Username, new { @class = "singelinetextbox" })%>
                        <%= Html.ValidationMessageFor(m => m.Username) %>
                    </li>
                    <li >
                        <%= Html.LabelFor(m => m.Password)%>
                    </li>
                    <li >
                        <%= Html.PasswordFor(m => m.Password, new { @class = "singelinetextbox" })%>
                        <%= Html.ValidationMessageFor(m => m.Password) %>
                    </li>
                    <li >
                        <%= Html.CheckBoxFor(m => m.RememberMe) %>
                        <%= Html.LabelFor(m => m.RememberMe) %>
                    </li>
                </ul>
                
                <p>
                    <input type="submit" value="Sign In" class=t-button />
                    <a id="registration-button" class=t-button >Register</a> 
                </p>
                </div>
        <% } %>
    </div>
    
    </td>
    <td style="width: 15em"></td>
    <td></td>
    </tr>
    </table>
    </div>
    </div>
   
   
     <% Html.Telerik().ScriptRegistrar()
           .OnDocumentReady(() =>
           {%>
               // open the initially hidden window when the button is clicked
               $('#registration-button')
                    .click(function(e) {
                        e.preventDefault();
                        $('#Window').data('tWindow').center().open();
                    });
               // add button hovers
               $('.t-button').live('mouseenter', $.telerik.buttonHover)
                             .live('mouseleave', $.telerik.buttonLeave);
           <%}); %>
</asp:Content>